#模拟生成数据与模型
chuwei_dir=./CV/chuwei
#mkdir -p ${chuwei_dir}/data ${chuwei_dir}/model
echo "dog11" > ${chuwei_dir}/data/dog1.txt
echo "dog3" > ${chuwei_dir}/data/dog3.txt
echo "v2" > ${chuwei_dir}/model/chuwei_20240529.pt

#如果需要更换OSS储存路径，则需要重新运行一遍下面的步骤
remote_name=btMinio
oss_end_point="http://minio.bangtu-internal.com:9000"
oss_access_key=miniotest
oss_secret_key=Bangtu@testminio888
oss_bucket_name=model
oss_subdir_name=lift/model_and_data
dvc remote add -d ${remote_name} s3://${oss_bucket_name}/${oss_subdir_name} -f
dvc remote modify ${remote_name} endpointurl ${oss_end_point}
dvc remote modify ${remote_name} access_key_id ${oss_access_key}
dvc remote modify ${remote_name} secret_access_key ${oss_secret_key}

#dvc命令
#data文件夹统一管理
dvc add ${chuwei_dir}/data
dvc push ${chuwei_dir}/data
#模型文件单独管理
dvc add ${chuwei_dir}/model/chuwei_20240529.pt
dvc push ${chuwei_dir}/model/chuwei_20240529.pt

#更新.gitignore
#echo "/CV/chuwei/data" >> ./.gitignore
#echo "/CV/chuwei/model/*.pt" >> ./.gitignore

#git命令
git add .
git commit -m "更新厨卫模型v2的数据与模型"
git push origin master:master
